sushu=[]
n=int(input())
a=len(str(n))
lower=10**(n-1)
upper=10**n-1
for i in range(lower,upper+1):
      if i<2:
         continue
      is_prime=True
      for  j in range(2,int(i**0.5)+1):
           if i%j==0:
               is_prime=False
               break
      if is_prime:
            sushu.append(i)
total=sum(sushu)
print(f"{lower}-{upper}之间所有的素数和={total}",end="")
